/**************************************************************************
 *         Copyright(c) 2007 by Sunplus mMedia  Technology Co., Ltd.       *
 *                                                                         *
 *  This software is copyrighted by and is the property of Sunplus mMedia  *
 *  Technology Co., Ltd. All rights are reserved by Sunplus mMedia Techno- *
 *  logy Co., Ltd. This software may only be used in accordance with the   *
 *  corresponding license agreement. Any unauthorized use, duplication,    *
 *  distribution, or disclosure of this software is expressly forbidden.   *
 *                                                                         *
 *  This Copyright notice "M U S T" not be removed or modified without     *
 *  prior written consent of Sunplus mMedia Technology  Co., Ltd.          *
 *                                                                         *
 *  Sunplus mMedia Technology Co., Ltd. reserves the right to modify this  *
 *  software without notice.                                               *
 *                                                                         *
 *  Sunplus mMedia Technology Co., Ltd.                                    *
 *  19-1, Innovation First Road, Science-Based Industrial Park,            *
 *  Hsin-Chu, Taiwan, R.O.C.                                               *
 *                                                                         *
 **************************************************************************/
#ifndef __CDSP_API_H__
#define __CDSP_API_H__

/**
 * @filename 	cdsp_api.h
 * @brief 	The header file of cdsp task
 * @author 	Cynthia
 * @since 	2008-1-9
 * @date 	2008-1-9
 */

/**************************************************************************
 *                           C O N S T A N T S                            *
 **************************************************************************/
#define CDSP_MAX_YUV_CORING ( 8 )
#define CDSP_MAX_YUV_H_SIZE ( 256 )

typedef enum {
	CDSP_RAW_BAD_PIXEL = 0,
	CDSP_RAW_POST_WB,
	CDSP_RAW_LC_DO
} cdspRaw_e;

typedef enum {
	CDSP_STAGE_SENSOR_TRIGGER = 0,
	CDSP_STAGE_1ST_LC,
	CDSP_STAGE_2ND_LC,
	CDSP_STAGE_QV,
	CDSP_STAGE_MAIN_1ST_PASS,
	CDSP_STAGE_MAIN_2ND_PASS,
	CDSP_STAGE_PV
} cdspStage_e;


/**************************************************************************
 *                              M A C R O S                               *
 **************************************************************************/

/**************************************************************************
 *                          D A T A    T Y P E S                          *
 **************************************************************************/

/**************************************************************************
 *                         G L O B A L    D A T A                         *
 **************************************************************************/

/**************************************************************************
 *                 E X T E R N A L    R E F E R E N C E S                 *
 **************************************************************************/

/**************************************************************************
 *               F U N C T I O N    D E C L A R A T I O N S               *
 **************************************************************************/
// cdsp_task.c
void sensorTrigger( UINT32 rawBufAddr, UINT16 sensorXSize, UINT16 sensorYSize, UINT16 dzoomXSize, UINT16 dzoomYSize, UINT16 rawXSize, UINT16 rawYSize, UINT8 soundOpt, UINT8 raw10BitOpt );
//void sensorBurstToPV( void );
void cdspDoInit( UINT32 rawBufAddr, UINT32 yuvBufAddr1, UINT32 yuvBufAddr2, UINT32 yuvBufAddr3, UINT32 yuvBufAddr4, UINT16 rawXSize, UINT16 rawYSize, UINT16 yuvXSize, UINT16 yuvYSize, UINT16 yuvLines, UINT8 abBufOpt, UINT8 raw10BitOpt );
void cdspQvDo( UINT8 rawMode, UINT32 rawBufAddr, UINT32 qvBufAddr, UINT16 rawXSize, UINT16 rawYSize, UINT16 qvXSize, UINT16 qvYSize, UINT16 xFactor, UINT16 yFactor, UINT8 opt );
void cdspPreprocessOff( UINT8 mode );
void cdspPreprocessReload( void );
void cdspDoFinish( void );
UINT8 cdspRawCB( UINT8 mode, UINT32 rawDataAddr, UINT16 rawXSize, UINT16 rawYSize, UINT8 rawMode );

#if 0
UINT8 cdspDoYuvHScaling( UINT32 srcAddr, UINT16 srcXSize, UINT16 srcYSize, UINT32 dstAddr, UINT16 dstXSize, UINT16 dstYSize );
#endif

void cdspSpecailEffect_ContrastSet( void );
void cdspSpecailEffect_BlackWhite( void );
void cdspSpecailEffect_Cold( void );
void cdspSpecailEffect_Warm( void );
void cdspSpecailEffect_Sunset( void );
void cdspSpecailEffect_Sepia( void );
void cdspSpecailEffect_Negative( void );
void cdspSpecailEffect_Binarize( void );
void cdspSpecailEffect_Red( void );
void cdspSpecailEffect_Blue( void );
void cdspSpecailEffect_Green( void );
void cdspSpecailEffect_Normal( void );
UINT8 SnapToPreview(void);

#endif  /* __CDSP_API_H__ */

